package com.miao.im.common.enums;

/**
 * @Auther: miaoguoxin
 * @Date: 2021/2/25 17:29
 * @Description:
 */
public enum LuaName {
    SAVE_SESSION("saveSession.lua", "保存session"),
    RENEW_SESSION("renewSession.lua", "刷新session"),
    SAVE_OFFLINE_MSG("saveOfflineMsg.lua", "保存离线消息"),
    BATCH_REFRESH_ONLINE_USER("batchRefreshOnlineUser.lua", "批量刷新在线用户时间"),
    ;

    private String code;

    private String value;

    LuaName(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static LuaName getByCode(String code) {
        for (LuaName e : LuaName.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
